package net.topikachu.dynamic.screen.widget;

import net.topikachu.dynamci.state.ScreenManager;
import net.topikachu.dynamic.repository.WidgetRepository;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

@Name("detailScreen")
@Scope(ScopeType.EVENT)
public class DetailScreen {
	@In
	WidgetRepository widgetRepository;
	@In
	ScreenManager detailScreenManager;

	public Widget getWidget() {
		return widgetRepository.getRootWidgetByScreen(detailScreenManager
				.getScreenIndentify());
	}
}
